function request(data) {
  return new Promise((resolve, reject) => {
    resolve(data)
  })
 }
 const listData = {
   total: 1,
   rows:  [
     {
       table1: '表格选项1', table2: 'width:150px', table3: 'align:right', table4: 'sortable: true', table5: '1'
     }
   ]
 }
// 列表
export function list(params) {
  return request(listData)
}
// 新增
export function add(data) {
  const tableData = listData.rows[0]
  listData.rows.push(tableData)
  listData.total = listData.rows.length
  return request(data)
}

// 修改
export function update(data) {
  listData.rows.forEach((item) => {
    item.table1 = '表格选项-xxx'
   })
   return request(data)
}

// 删除
export function del(id) {
  listData.rows = listData.rows.slice(-1)
  listData.total = listData.rows.length
  return request(id)
}
